export default {
    state: {
        ceSwitch: localStorage.getItem('es') || '',
        flag: localStorage.getItem('flag') || false
    },
    mutations: {
        Chinese_English_Switch_Mutation (state, data) {
            localStorage.setItem('es', data)
            state.ceSwitch = data
        },
        White_Black_Switch_Mutation (state, data) {
            localStorage.setItem('flag', data)
            state.ceSwitch = data
        }
    },
    actions: {
        // 多语言切换
        Chinese_English_Switch_Actions ({commit}, data) {
            commit('Chinese_English_Switch_Mutation', data)
        },
        // 黑白换肤
        White_Black_Switch_Actions ({commit}, data) {
            commit('White_Black_Switch_Mutation', data)
        }
    }
}